package com.un.ebs.core.enums;


import lombok.Getter;

/**
 * @Description 默认数据类型
 * @Author lcl
 * @Date Created in 2021/1/28
 */
@Getter
public enum DefaultFieldTypeEnum {
    LogicalDeletion(1, "逻辑删除"),
    MultiTenancy(2,"多租户"),
    Workflow(3,"工作流:"),
    Sort(4,"排序"),
    Parent(5,"父子结构"),
    Review(6,"审核"),
    SUPPORT_OPERATION_LOG(7,"操作日志");

    private final int code;
    private final  String desc;

    DefaultFieldTypeEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static DefaultFieldTypeEnum getByCode(int code) {
        for (DefaultFieldTypeEnum defaultFieldTypeEnum : values()) {
            if(code==defaultFieldTypeEnum.getCode()){
                return defaultFieldTypeEnum;
            }
        }
        return null;
    }
}
